home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / linklist / source.lha / doc / lFndNode.3 < prev    next >
Text File  |  1993-08-08  |  2KB  |  65 lines

  1. '.so tmac.clman
  2. .TH "lFndNode"
  3. .IX lFndNode
  4. .SH NAME
  5. lFndNode - Find node.
  6. .SH SYNOPSIS
  7. int
  8. .BR "lFndNode" "(id, from, func, ptr, data, size)"
  9. .br
  10. .RT
  11. .RP
  12. In    int    id    identifier of linked list
  13. .br
  14. .RP
  15. In    int    from    from where must be searched
  16. .br
  17. .RP
  18. In    int    (*func)()    function for checking the data on conditions
  19. .br
  20. .RP
  21. In    Byte    *ptr    data for comparison in function
  22. .br
  23. .RP
  24. Out    Byte    *data    data of node
  25. .br
  26. .RP
  27. In    int    size    size of data
  28. .DT
  29. .SH DESCRIPTION
  30. \fBlFndNode\fP searches a node from the linked list, using the user
  31. defined serach function \fIfunc\fP, which checks the data of a node
  32. on conditions. This function must have two parameters, a pointer to
  33. the data to compare with and a pointer to the data of a node. The
  34. possible return values are lFOUND or lNOT_FOUND. See the introduction
  35. of Generic Linked List for an example of such a search function. From
  36. where the node must be searched can be specified by \fIfrom\fP. A node
  37. can be searched forward from the beginning of the list or from the
  38. current node and backward from the current node or from the end of the
  39. list.
  40. .br
  41. Backward searching is only possible for doubly linked list.
  42. .br
  43. When the found node is the first or the last node, the return code will
  44. have the value lFIRST or lLAST, otherwise lFOUND.
  45. .SH PARAMETER DEFINITIONS
  46. .if t .ta 0.2i 1.5i
  47. \fIfrom\fP :
  48. .nf
  49.     lFIRST    search forward from first node
  50.     lPREVIOUS    search backward from previous node
  51.     lNEXT    search forward from next node
  52.     lLAST    search backward from last node
  53. .fi
  54. .SH RETURN CODES
  55. .nf
  56. Return on success :
  57.     lFOUND, lFIRST, lLAST, lNOT_FOUND
  58. Return on error :
  59. .fi
  60. .in +0.2i
  61. lUNKNOWN_ID, lEMPTY_LIST, lWRONG_FROM, lUNKNOWN_FUNC, lNOT_DOUBLY
  62. .in 10.2i
  63. .SH AUTHOR
  64. Anita Eijs (TNO - Bouw - BouwInformatica)
  65.